
function foo(a,b)
	print("---- testFoo")
	return a+b;
end

function testString(a)
	print("---- testString")
	if a ~= "testing" then
		if a == nil then
			print("Error: Arg was nil")
		else
			print ("Error: Param not correct : ".. a)
		end
	end
	return "response"
end

function testArray(a)
	print("---- testArray")
	for i,v in ipairs(a) do
		print("a["..i.."] = ".. v)
	end
	a = {"one", "two", 3}
	return a;
end

function testObject(o)
	print("---- testObject")
	for k,v in pairs(o) do
		print("\t"..k.."=>"..v)
	end
end

function testDict(o)
	print("---- testDict")
-- 	for k,v in pairs(o) do
-- 		print("\t"..k.."=>"..v)
-- 	end
	error = 0
	if o.foo ~= "1" then
		print("Error: o[foo]"); error = 1;
	end
	if o[2] ~= "bar" then
		print("Error: o[2]"); error = 1;
	end
	if o[3.5] ~= "Three point five" then
		print("Error:  o[3.5]"); error = 1;
	end

	if error == 1 then do return nil end end
	t = {darwin = 1, ["religion"] = 0}
	return t;
end

function testDate(d)
	print("---- testDate")
	for k,v in pairs(d) do
		print(k,v);
	end
	return os.date("*t");
end

function testMultiReturn()
	print("---- testMultiReturn")
	return 1,2,3,4,5,6,7,8,9
end

print "*** HELLO FROM LUA *** test.lua initialized"
return 256